package by.jtraining.london.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import by.jtraining.london.model.Admin;
import by.jtraining.london.repo.AdminRepository;
import by.jtraining.london.service.AdminService;

import com.google.inject.Inject;
import com.google.inject.persist.Transactional;

public class AdminServiceImpl extends
		GenericServiceImpl<Admin, Long, AdminRepository> implements
		AdminService {
	 private static final Logger LOG = LoggerFactory
				.getLogger(AdminServiceImpl.class);
	@Inject
	public AdminServiceImpl(AdminRepository adminRepository) {
		super(adminRepository);
	}

	@Transactional
	@Override
	public void add(Admin admin) {
		LOG.debug("Trying to persist {}", admin);
		repo.add(admin);
		LOG.debug("Added {}", admin);
	}
}
